---
id: 65824872894f59546e3084e2
title: ステップ 25
challengeType: 20
dashedName: step-25
---

# --description--

The `while` loop you created in the previous step is an infinite loop that will allow the program to continuously present menu options until the user decides to exit.

After the `print()` call, add another one to print the string `'1. Add an expense'`.

# --hints--

You should have `print('1. Add an expense')` in your `while` loop.

```js
({ test: () =>
  {
    const transformedCode = code.replace(/\r/g, "");        
    const foo = __helpers.python.getDef("\n"+transformedCode, "main");
    const {function_body} = foo;    
    assert(function_body.match(/^\s+print\s*\(\s*("|')1\.\sAdd\san\sexpense\1\s*\)/m));
  }
})
```

# --seed--

## --seed-contents--

```py
def add_expense(expenses, amount, category):
    expenses.append({'amount': amount, 'category': category})

def print_expenses(expenses):
    for expense in expenses:
        print(f'Amount: {expense["amount"]}, Category: {expense["category"]}')

def total_expenses(expenses):
    return sum(map(lambda expense: expense['amount'], expenses))

def filter_expenses_by_category(expenses, category):
    return filter(lambda expense: expense['category'] == category, expenses)

def main():
    expenses = []
--fcc-editable-region--
    while True:
        print('\nExpense Tracker')

--fcc-editable-region--
```
